<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

//import {getData} from '@/api/user.js'

export default {
  name: 'HomeView',
  data(){
    return{
      data:[]
    }
  },
  components: {
    HelloWorld
  },
  methods:{
    
    getData(){
      this.$http.get('/api/user').then(res=>{
        console.log(res)
      })
      // let d = getData()
      // console.log(d)
    }
  },
  created(){
    this.getData() 
  }
}
</script>
